package cn.aws360.boot.wechat.api.pojo.request;

import cn.aws360.boot.base.api.validation.ValidationGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author junnan
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("微信应用-写入实例")
public class WxmAppWrite {

    @ApiModelProperty(value = "主键 ID, 修改时为必传")
    @NotNull(message = "参配 id 不能为空", groups = {ValidationGroup.edit.class})
    private Integer id;

    @ApiModelProperty(value = "应用类型", required = true)
    private Integer type;

    @ApiModelProperty(value = "绑定邮箱")
    @NotBlank(message = "绑定邮箱 email 不能为空", groups = {ValidationGroup.add.class, ValidationGroup.edit.class})
    private String email;

    @ApiModelProperty(value = "微信 ID", required = true)
    @NotBlank(message = "微信 ID 不能为空", groups = {ValidationGroup.add.class, ValidationGroup.edit.class})
    private String wxId;

    @ApiModelProperty(value = "应用 ID", required = true)
    @NotBlank(message = "应用 ID 不能为空", groups = {ValidationGroup.add.class, ValidationGroup.edit.class})
    private String appId;

    @ApiModelProperty(value = "应用名称", required = true)
    @NotBlank(message = "应用名称 appName 不能为空", groups = {ValidationGroup.add.class, ValidationGroup.edit.class})
    private String appName;

    @ApiModelProperty(value = "应用令牌", required = true)
    @NotBlank(message = "应用名称 appToken 不能为空", groups = {ValidationGroup.add.class, ValidationGroup.edit.class})
    private String appToken;

    @ApiModelProperty(value = "应用密钥", required = true)
    @NotBlank(message = "应用密钥 appSecret 不能为空", groups = {ValidationGroup.add.class, ValidationGroup.edit.class})
    private String appSecret;

    @ApiModelProperty(value = "加密键值")
    private String appAesKey;

    @ApiModelProperty(value = "二维码 URL")
    private String appQrcode;

    @ApiModelProperty(value = "备注信息")
    private String remark;

}
